<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<html>
  <head>
   	<title>后台用户登录</title>
  </head>
  <body>
  <script type="text/javascript">
  $(function(){
		urlDialog=__ctxPath+"/front/login.do?decorator=blank";
		createOverlayDlg("login",{
			width:850,
			height:500,
			bgiframe: true,
			buttons:{
				"登录":function (){		
			var j_username=$("#j_username").val();
			var j_password=$("#j_password").val();
				$.ajax({
					 type: "post",
					  url:__ctxPath+"/j_security_check",
					  data:{j_username:j_username,j_password:j_password},
					  cache: false,
					  success: function(msg){
						if(msg.indexOf("用户或密码出错")!=-1){
							alert("登录失败");
						}else{
						$("#login").dialog("close");
						window.location.href='${url}';
						}
					  }
				  })
				},
				"取 消":function (){$(this).dialog("close");}
				},
				url:urlDialog
		});
  });
</script>
  </body>
</html>
